@extends('layouts.install_app')

@section('title', 'IdeaSpaceVR 汉化版')

@section('content')

    <div class="row">

        <div class="col-md-8 col-md-offset-2">
            <h1>IdeaSpaceVR 汉化版</h1>
        </div>
    </div>

    {!! Form::open(array('route' => 'server_requirements', 'method' => 'POST', 'autocomplete' => 'false', 'class' => 'form-horizontal')) !!}

    <div class="row">

        <div class="col-md-8 col-md-offset-2">

            <div class="panel panel-default">

                <div class="panel-body">

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label"></label>
                        <div class="col-sm-4">
                        <h4>检查系统要求</h4>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">PHP 版本</label>
                        <div class="col-sm-4">
                            {!! !in_array('phpversion', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> PHP 版本 ' . $phpversion . ' 已经安装</div>':'' !!}
                            {!! in_array('phpversion', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> PHP版本错误 (' . $phpversion . '). PHP version >= ' . \App\Http\Controllers\InstallationController::REQUIRED_PHP_VERSION . ' is required.</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">OpenSSL PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('openssl', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> OpenSSL PHP 扩展 已经安装</div>':'' !!}
                            {!! in_array('openssl', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> OpenSSL PHP扩展 未安装 </div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">PDO PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('pdo', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> PDO PHP 扩展 已经安装</div>':'' !!}
                            {!! in_array('pdo', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> PDO PHP扩展 未安装</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">Fileinfo PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('fileinfo', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Fileinfo PHP 扩展 已经安装</div>':'' !!}
                            {!! in_array('fileinfo', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Fileinfo PHP 扩展 未安装</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">Mbstring PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('mbstring', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Mbstring PHP 扩展 已经安装</div>':'' !!}
                            {!! in_array('mbstring', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Mbstring PHP 扩展 未安装</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">Tokenizer PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('tokenizer', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Tokenizer PHP 扩展 已经安装</div>':'' !!}
                            {!! in_array('tokenizer', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Tokenizer PHP 扩展 未安装</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">存储目录读写权限 (./storage)</label>
                        <div class="col-sm-4">
                            {!! !in_array('storage_directory', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 存储目录拥有读写权限</div>':'' !!}
                            {!! in_array('storage_directory', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 存储目录读没有写权限</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">缓存目录读写权限 (./bootstrap/cache)</label>
                        <div class="col-sm-4">
                            {!! !in_array('bootstrap_cache_directory', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 缓存目录拥有读写权限</div>':'' !!}
                            {!! in_array('bootstrap_cache_directory', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 缓存目录没有读写权限</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">资源目录读写权限 (./public/assets/user)</label>
                        <div class="col-sm-4">
                            {!! !in_array('user_assets_directory', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 资源目录拥有读写权限</div>':'' !!}
                            {!! in_array('user_assets_directory', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 资源目录没有读写权限</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">数据库配置文件 (./config/database.php)</label>
                        <div class="col-sm-4">
                            {!! !in_array('config_database_file', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 数据库配置文件拥有读写权限</div>':'' !!}
                            {!! in_array('config_database_file', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 数据库配置文件没有读写权限</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">Application 写入权限 (./config/app.php)</label>
                        <div class="col-sm-4">
                            {!! !in_array('config_app_file', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Application 拥有读写权限</div>':'' !!}
                            {!! in_array('config_app_file', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Application 缺少读写权限</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label">GD 或 ImageMagick PHP 扩展</label>
                        <div class="col-sm-4">
                            {!! !in_array('gd_imagick', $errors)?'<div class="alert alert-success" role="alert"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>已安装 ' . $gd_imagick . ' PHP 扩展 </div>':'' !!}
                            {!! in_array('gd_imagick', $errors)?'<div class="alert alert-danger" role="alert"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>GD 或 ImageMagick PHP 扩展至少要安装一种</div>':'' !!}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-sm-offset-2 control-label"></label>
                        <div class="col-sm-4">
                            <button class="btn btn-primary" type="submit" @if (!empty($errors))disabled="disabled"@endif>下一步</button>
                        </div>
                    </div>

                </div> <!-- end panel-body //-->

            </div><!-- end panel //-->

        </div>

    </div> <!-- end row //-->

    {!! Form::close() !!}

@endsection
